<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 100px;
      height: 100px;
      background-color: aqua;
      transition: all 0.5s;
    }

    .bbb {
      font-size: 40px;
    }

    .a {
      background-color: blue;
      width: 200px;
      height: 200px;
      transform: rotate(360deg);
    }
  </style>
  <script src="../js/jquery.min.js"></script>
  <script>
    $(() => {
      $('.box').click(function () {
        //添加类名
        // $(this).addClass('a')
        //删除类名
        $(this).removeClass('bbb')
        //切换类名
        $(this).toggleClass('a')
      })

    })
  </script>
</head>

<body>
  <div class="box bbb">123</div>
</body>

</html>